/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.close.basic.entity;

import com.hopes.bizz.close.common.constant.enums.ParkCloseSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.boss.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;

/**
 * 管控区域
 *
 * @author pig
 * @date 2023-10-20 09:03:39
 */
@Data
@TableName("closed_control_area")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "管控区域")
public class ClosedControlAreaEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;


	/**
	* ID
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="ID")
    private Long id;

	/**
	* 区域名称
	*/
    @Schema(description="区域名称")
    private String name;

	/**
	* 是否定位
	*/
    @Schema(description="是否定位")
    private String locatedFlag;

	/**
	* 管控级别
	*/
    @Schema(description="管控级别")
    private Integer level;

	/**
	* 管控区域
	*/
    @Schema(description="管控区域")
    private String controlArea;

	/**
	* 备注
	*/
    @Schema(description="备注")
    private String remark;

	/**
	* 是否使用
	*/
    @Schema(description="是否使用")
    private String useFlag;

	/**
	 * 机构ID
	 */
	@Schema(description="机构ID")
	private Long orgId;


    public String getOrgIdStr() {
        return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company, this.getOrgId());
    }

    public String getLevelStr() {
    	return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.close_area_control_level, this.getLevel());
	}
}
